<#define __MODELS__="{{LAM.MODELS}}" />
<#import path="/CaptchaModel.class.js" write="1" befor="1" root="__MODELS__" />
<div id="v_container" style="width: 200px;height: 50px;"></div>
        <input type="text" id="code_input" value="" placeholder="请输入验证码"/><button id="my_button">验证</button>
<script>
    LAM.run(function(){
        'use strict';
        var System = this;
        var verifyCode = new System.CaptchaModel("v_container");
        document.getElementById("my_button").onclick = function(){
            var res = verifyCode.validate(document.getElementById("code_input").value);
            if(res){
                alert("验证正确");
            }else{
                alert("验证码错误");
            }
        }
    });
</script>